using UnityEngine;
using UnityEngine.UI;

namespace Demo2048
{
    public class Content : MonoBehaviour
    {
        void Awake()
        {
            m_textc = GetComponentInChildren<Text>();
            m_val = 0;
        }

        void SetText(int v)
        {
            m_textc.text = v.ToString();
        }

        public int Val
        {
            get
            {
                return m_val;
            }
            set
            {
                m_val = value;
                SetText(m_val);
            }
        }

        private int m_val;
        Text m_textc;
    }
}